﻿using Root.Models.DAL;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Root.Api
{
    /// <summary>
    /// Vote 的摘要说明
    /// </summary>
    public class Vote : IHttpHandler
    {

        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            try
            {
                ArticleDAL.AddCount(Convert.ToInt32(context.Request["AddId"]));
                context.Response.Write("OK");
            }
            catch (Exception)
            {
                context.Response.Write("ERR");
            }
        }

        public bool IsReusable
        {
            get
            {
                return false;
            }
        }
    }
}